Optimal. Leaf size=314 \[ -\frac {(i A+B) (a+i a \tan (e+f x))^{7/2}}{17 f (c-i c \tan (e+f x))^{17/2}}-\frac {(5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{255 c f (c-i c \tan (e+f x))^{15/2}}-\frac {4 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{3315 c^2 f (c-i c \tan (e+f x))^{13/2}}-\frac {4 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{12155 c^3 f (c-i c \tan (e+f x))^{11/2}}-\frac {8 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{109395 c^4 f (c-i c \tan (e+f x))^{9/2}}-\frac {8 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{765765 c^5 f (c-i c \tan (e+f x))^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.24, antiderivative size = 314, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 4, integrand size = 45, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.089, Rules used = {3669, 79, 47,
37} \begin {gather*} -\frac {8 (-12 B+5 i A) (a+i a \tan (e+f x))^{7/2}}{765765 c^5 f (c-i c \tan (e+f x))^{7/2}}-\frac {8 (-12 B+5 i A) (a+i a \tan (e+f x))^{7/2}}{109395 c^4 f (c-i c \tan (e+f x))^{9/2}}-\frac {4 (-12 B+5 i A) (a+i a \tan (e+f x))^{7/2}}{12155 c^3 f (c-i c \tan (e+f x))^{11/2}}-\frac {4 (-12 B+5 i A) (a+i a \tan (e+f x))^{7/2}}{3315 c^2 f (c-i c \tan (e+f x))^{13/2}}-\frac {(-12 B+5 i A) (a+i a \tan (e+f x))^{7/2}}{255 c f (c-i c \tan (e+f x))^{15/2}}-\frac {(B+i A) (a+i a \tan (e+f x))^{7/2}}{17 f (c-i c \tan (e+f x))^{17/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 37
Rule 47
Rule 79
Rule 3669
Rubi steps
\begin {align*} \int \frac {(a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^{17/2}} \, dx &=\frac {(a c) \text {Subst}\left (\int \frac {(a+i a x)^{5/2} (A+B x)}{(c-i c x)^{19/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {(i A+B) (a+i a \tan (e+f x))^{7/2}}{17 f (c-i c \tan (e+f x))^{17/2}}+\frac {(a (5 A+12 i B)) \text {Subst}\left (\int \frac {(a+i a x)^{5/2}}{(c-i c x)^{17/2}} \, dx,x,\tan (e+f x)\right )}{17 f}\\ &=-\frac {(i A+B) (a+i a \tan (e+f x))^{7/2}}{17 f (c-i c \tan (e+f x))^{17/2}}-\frac {(5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{255 c f (c-i c \tan (e+f x))^{15/2}}+\frac {(4 a (5 A+12 i B)) \text {Subst}\left (\int \frac {(a+i a x)^{5/2}}{(c-i c x)^{15/2}} \, dx,x,\tan (e+f x)\right )}{255 c f}\\ &=-\frac {(i A+B) (a+i a \tan (e+f x))^{7/2}}{17 f (c-i c \tan (e+f x))^{17/2}}-\frac {(5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{255 c f (c-i c \tan (e+f x))^{15/2}}-\frac {4 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{3315 c^2 f (c-i c \tan (e+f x))^{13/2}}+\frac {(4 a (5 A+12 i B)) \text {Subst}\left (\int \frac {(a+i a x)^{5/2}}{(c-i c x)^{13/2}} \, dx,x,\tan (e+f x)\right )}{1105 c^2 f}\\ &=-\frac {(i A+B) (a+i a \tan (e+f x))^{7/2}}{17 f (c-i c \tan (e+f x))^{17/2}}-\frac {(5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{255 c f (c-i c \tan (e+f x))^{15/2}}-\frac {4 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{3315 c^2 f (c-i c \tan (e+f x))^{13/2}}-\frac {4 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{12155 c^3 f (c-i c \tan (e+f x))^{11/2}}+\frac {(8 a (5 A+12 i B)) \text {Subst}\left (\int \frac {(a+i a x)^{5/2}}{(c-i c x)^{11/2}} \, dx,x,\tan (e+f x)\right )}{12155 c^3 f}\\ &=-\frac {(i A+B) (a+i a \tan (e+f x))^{7/2}}{17 f (c-i c \tan (e+f x))^{17/2}}-\frac {(5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{255 c f (c-i c \tan (e+f x))^{15/2}}-\frac {4 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{3315 c^2 f (c-i c \tan (e+f x))^{13/2}}-\frac {4 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{12155 c^3 f (c-i c \tan (e+f x))^{11/2}}-\frac {8 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{109395 c^4 f (c-i c \tan (e+f x))^{9/2}}+\frac {(8 a (5 A+12 i B)) \text {Subst}\left (\int \frac {(a+i a x)^{5/2}}{(c-i c x)^{9/2}} \, dx,x,\tan (e+f x)\right )}{109395 c^4 f}\\ &=-\frac {(i A+B) (a+i a \tan (e+f x))^{7/2}}{17 f (c-i c \tan (e+f x))^{17/2}}-\frac {(5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{255 c f (c-i c \tan (e+f x))^{15/2}}-\frac {4 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{3315 c^2 f (c-i c \tan (e+f x))^{13/2}}-\frac {4 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{12155 c^3 f (c-i c \tan (e+f x))^{11/2}}-\frac {8 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{109395 c^4 f (c-i c \tan (e+f x))^{9/2}}-\frac {8 (5 i A-12 B) (a+i a \tan (e+f x))^{7/2}}{765765 c^5 f (c-i c \tan (e+f x))^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice
the leaf count of optimal. \(655\) vs. \(2(314)=628\).
time = 17.07, size = 655, normalized size = 2.09 \begin {gather*} \frac {\cos ^4(e+f x) \left ((-i A+B) \cos (6 f x) \left (\frac {\cos (3 e)}{448 c^9}+\frac {i \sin (3 e)}{448 c^9}\right )+(-22 i A+15 B) \cos (8 f x) \left (\frac {\cos (5 e)}{2016 c^9}+\frac {i \sin (5 e)}{2016 c^9}\right )+(-145 i A+51 B) \cos (10 f x) \left (\frac {\cos (7 e)}{6336 c^9}+\frac {i \sin (7 e)}{6336 c^9}\right )+(-60 i A+B) \cos (12 f x) \left (\frac {\cos (9 e)}{2288 c^9}+\frac {i \sin (9 e)}{2288 c^9}\right )+(215 A-69 i B) \cos (14 f x) \left (-\frac {i \cos (11 e)}{12480 c^9}+\frac {\sin (11 e)}{12480 c^9}\right )+(50 A-33 i B) \cos (16 f x) \left (-\frac {i \cos (13 e)}{8160 c^9}+\frac {\sin (13 e)}{8160 c^9}\right )+(A-i B) \cos (18 f x) \left (-\frac {i \cos (15 e)}{1088 c^9}+\frac {\sin (15 e)}{1088 c^9}\right )+(A+i B) \left (\frac {\cos (3 e)}{448 c^9}+\frac {i \sin (3 e)}{448 c^9}\right ) \sin (6 f x)+(22 A+15 i B) \left (\frac {\cos (5 e)}{2016 c^9}+\frac {i \sin (5 e)}{2016 c^9}\right ) \sin (8 f x)+(145 A+51 i B) \left (\frac {\cos (7 e)}{6336 c^9}+\frac {i \sin (7 e)}{6336 c^9}\right ) \sin (10 f x)+(60 A+i B) \left (\frac {\cos (9 e)}{2288 c^9}+\frac {i \sin (9 e)}{2288 c^9}\right ) \sin (12 f x)+(215 A-69 i B) \left (\frac {\cos (11 e)}{12480 c^9}+\frac {i \sin (11 e)}{12480 c^9}\right ) \sin (14 f x)+(50 A-33 i B) \left (\frac {\cos (13 e)}{8160 c^9}+\frac {i \sin (13 e)}{8160 c^9}\right ) \sin (16 f x)+(A-i B) \left (\frac {\cos (15 e)}{1088 c^9}+\frac {i \sin (15 e)}{1088 c^9}\right ) \sin (18 f x)\right ) \sqrt {\sec (e+f x) (c \cos (e+f x)-i c \sin (e+f x))} (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x))}{f (\cos (f x)+i \sin (f x))^3 (A \cos (e+f x)+B \sin (e+f x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.46, size = 230, normalized size = 0.73
method | result | size |
risch | \(-\frac {a^{3} \sqrt {\frac {a \,{\mathrm e}^{2 i \left (f x +e \right )}}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, \left (45045 i A \,{\mathrm e}^{16 i \left (f x +e \right )}+45045 B \,{\mathrm e}^{16 i \left (f x +e \right )}+255255 i A \,{\mathrm e}^{14 i \left (f x +e \right )}+153153 B \,{\mathrm e}^{14 i \left (f x +e \right )}+589050 i A \,{\mathrm e}^{12 i \left (f x +e \right )}+117810 B \,{\mathrm e}^{12 i \left (f x +e \right )}+696150 i A \,{\mathrm e}^{10 i \left (f x +e \right )}-139230 B \,{\mathrm e}^{10 i \left (f x +e \right )}+425425 i A \,{\mathrm e}^{8 i \left (f x +e \right )}-255255 B \,{\mathrm e}^{8 i \left (f x +e \right )}+109395 i A \,{\mathrm e}^{6 i \left (f x +e \right )}-109395 B \,{\mathrm e}^{6 i \left (f x +e \right )}\right )}{24504480 c^{8} \sqrt {\frac {c}{{\mathrm e}^{2 i \left (f x +e \right )}+1}}\, f}\) | \(206\) |
derivativedivides | \(\frac {i \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} \left (1+\tan ^{2}\left (f x +e \right )\right ) \left (11175 i A \left (\tan ^{3}\left (f x +e \right )\right )+12960 i B \left (\tan ^{4}\left (f x +e \right )\right )-96 B \left (\tan ^{7}\left (f x +e \right )\right )+103165 i A \tan \left (f x +e \right )-400 A \left (\tan ^{6}\left (f x +e \right )\right )+109881 i B \left (\tan ^{2}\left (f x +e \right )\right )+4464 B \left (\tan ^{5}\left (f x +e \right )\right )+5871 i B +5400 A \left (\tan ^{4}\left (f x +e \right )\right )+40 i A \left (\tan ^{7}\left (f x +e \right )\right )-26820 B \left (\tan ^{3}\left (f x +e \right )\right )-1860 i A \left (\tan ^{5}\left (f x +e \right )\right )-18030 A \left (\tan ^{2}\left (f x +e \right )\right )-960 i B \left (\tan ^{6}\left (f x +e \right )\right )+58710 B \tan \left (f x +e \right )+66260 A \right )}{765765 f \,c^{9} \left (i+\tan \left (f x +e \right )\right )^{10}}\) | \(230\) |
default | \(\frac {i \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} \left (1+\tan ^{2}\left (f x +e \right )\right ) \left (11175 i A \left (\tan ^{3}\left (f x +e \right )\right )+12960 i B \left (\tan ^{4}\left (f x +e \right )\right )-96 B \left (\tan ^{7}\left (f x +e \right )\right )+103165 i A \tan \left (f x +e \right )-400 A \left (\tan ^{6}\left (f x +e \right )\right )+109881 i B \left (\tan ^{2}\left (f x +e \right )\right )+4464 B \left (\tan ^{5}\left (f x +e \right )\right )+5871 i B +5400 A \left (\tan ^{4}\left (f x +e \right )\right )+40 i A \left (\tan ^{7}\left (f x +e \right )\right )-26820 B \left (\tan ^{3}\left (f x +e \right )\right )-1860 i A \left (\tan ^{5}\left (f x +e \right )\right )-18030 A \left (\tan ^{2}\left (f x +e \right )\right )-960 i B \left (\tan ^{6}\left (f x +e \right )\right )+58710 B \tan \left (f x +e \right )+66260 A \right )}{765765 f \,c^{9} \left (i+\tan \left (f x +e \right )\right )^{10}}\) | \(230\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.74, size = 436, normalized size = 1.39 \begin {gather*} \frac {{\left (45045 \, {\left (-i \, A - B\right )} a^{3} \cos \left (\frac {17}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 51051 \, {\left (-5 i \, A - 3 \, B\right )} a^{3} \cos \left (\frac {15}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 117810 \, {\left (-5 i \, A - B\right )} a^{3} \cos \left (\frac {13}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 139230 \, {\left (-5 i \, A + B\right )} a^{3} \cos \left (\frac {11}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 85085 \, {\left (-5 i \, A + 3 \, B\right )} a^{3} \cos \left (\frac {9}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 109395 \, {\left (-i \, A + B\right )} a^{3} \cos \left (\frac {7}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 45045 \, {\left (A - i \, B\right )} a^{3} \sin \left (\frac {17}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 51051 \, {\left (5 \, A - 3 i \, B\right )} a^{3} \sin \left (\frac {15}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 117810 \, {\left (5 \, A - i \, B\right )} a^{3} \sin \left (\frac {13}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 139230 \, {\left (5 \, A + i \, B\right )} a^{3} \sin \left (\frac {11}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 85085 \, {\left (5 \, A + 3 i \, B\right )} a^{3} \sin \left (\frac {9}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right ) + 109395 \, {\left (A + i \, B\right )} a^{3} \sin \left (\frac {7}{2} \, \arctan \left (\sin \left (2 \, f x + 2 \, e\right ), \cos \left (2 \, f x + 2 \, e\right )\right )\right )\right )} \sqrt {a}}{24504480 \, c^{\frac {17}{2}} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.42, size = 197, normalized size = 0.63 \begin {gather*} -\frac {{\left (45045 \, {\left (i \, A + B\right )} a^{3} e^{\left (19 i \, f x + 19 i \, e\right )} + 6006 \, {\left (50 i \, A + 33 \, B\right )} a^{3} e^{\left (17 i \, f x + 17 i \, e\right )} + 3927 \, {\left (215 i \, A + 69 \, B\right )} a^{3} e^{\left (15 i \, f x + 15 i \, e\right )} + 21420 \, {\left (60 i \, A - B\right )} a^{3} e^{\left (13 i \, f x + 13 i \, e\right )} + 7735 \, {\left (145 i \, A - 51 \, B\right )} a^{3} e^{\left (11 i \, f x + 11 i \, e\right )} + 24310 \, {\left (22 i \, A - 15 \, B\right )} a^{3} e^{\left (9 i \, f x + 9 i \, e\right )} + 109395 \, {\left (i \, A - B\right )} a^{3} e^{\left (7 i \, f x + 7 i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{24504480 \, c^{9} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 14.48, size = 229, normalized size = 0.73 \begin {gather*} -\frac {\sqrt {a+\frac {a\,\sin \left (e+f\,x\right )\,1{}\mathrm {i}}{\cos \left (e+f\,x\right )}}\,\left (\frac {a^3\,{\mathrm {e}}^{e\,8{}\mathrm {i}+f\,x\,8{}\mathrm {i}}\,\left (5\,A+B\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{288\,c^8\,f}+\frac {a^3\,{\mathrm {e}}^{e\,10{}\mathrm {i}+f\,x\,10{}\mathrm {i}}\,\left (5\,A+B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{176\,c^8\,f}+\frac {a^3\,{\mathrm {e}}^{e\,12{}\mathrm {i}+f\,x\,12{}\mathrm {i}}\,\left (5\,A-B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{208\,c^8\,f}+\frac {a^3\,{\mathrm {e}}^{e\,14{}\mathrm {i}+f\,x\,14{}\mathrm {i}}\,\left (5\,A-B\,3{}\mathrm {i}\right )\,1{}\mathrm {i}}{480\,c^8\,f}+\frac {a^3\,{\mathrm {e}}^{e\,6{}\mathrm {i}+f\,x\,6{}\mathrm {i}}\,\left (A+B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{224\,c^8\,f}+\frac {a^3\,{\mathrm {e}}^{e\,16{}\mathrm {i}+f\,x\,16{}\mathrm {i}}\,\left (A-B\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{544\,c^8\,f}\right )}{\sqrt {c-\frac {c\,\sin \left (e+f\,x\right )\,1{}\mathrm {i}}{\cos \left (e+f\,x\right )}}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________